package com.sophossystems.client.asmon.dto;

import java.io.Serializable;


/** 
 * This class represents the primary key of the Role table.
 */
public class RolePkDTO implements Serializable
{
	/**
	 * 
	 */
	private static final long serialVersionUID = -8452856738534381123L;

	protected int idRole;

	/** 
	 * This attribute represents whether the primitive attribute idRole is null.
	 */
	protected boolean idRoleNull;

	/** 
	 * Sets the value of idRole
	 */
	public void setIdRole(int idRole)
	{
		this.idRole = idRole;
	}

	/** 
	 * Gets the value of idRole
	 */
	public int getIdRole()
	{
		return idRole;
	}

	/**
	 * Method 'RolePk'
	 * 
	 */
	public RolePkDTO()
	{
	}

	/**
	 * Method 'RolePk'
	 * 
	 * @param idRole
	 */
	public RolePkDTO(final int idRole)
	{
		this.idRole = idRole;
	}

	/** 
	 * Sets the value of idRoleNull
	 */
	public void setIdRoleNull(boolean idRoleNull)
	{
		this.idRoleNull = idRoleNull;
	}

	/** 
	 * Gets the value of idRoleNull
	 */
	public boolean isIdRoleNull()
	{
		return idRoleNull;
	}

	/**
	 * Method 'equals'
	 * 
	 * @param _other
	 * @return boolean
	 */
	@Override
	public boolean equals(Object _other)
	{
		if (_other == null) {
			return false;
		}
		
		if (_other == this) {
			return true;
		}
		
		if (!(_other instanceof RolePkDTO)) {
			return false;
		}
		
		final RolePkDTO _cast = (RolePkDTO) _other;
		if (idRole != _cast.idRole) {
			return false;
		}
		
		if (idRoleNull != _cast.idRoleNull) {
			return false;
		}
		
		return true;
	}

	/**
	 * Method 'hashCode'
	 * 
	 * @return int
	 */
	@Override
	public int hashCode()
	{
		int _hashCode = 0;
		_hashCode = 29 * _hashCode + idRole;
		_hashCode = 29 * _hashCode + (idRoleNull ? 1 : 0);
		return _hashCode;
	}

	/**
	 * Method 'toString'
	 * 
	 * @return String
	 */
	@Override
	public String toString()
	{
		StringBuffer ret = new StringBuffer();
		ret.append( "com.sophossystems.client.asmon.dto.RolePk: " );
		ret.append( "idRole=" + idRole );
		return ret.toString();
	}

}
